#include "delay.h"

void delay10us(uint16_t us)
{
	uint16_t count;
	if(us>60000)us=60000;
	
	__HAL_TIM_SET_COUNTER(&htim16,0);
	HAL_TIM_Base_Start(&htim16);	

	while(count<us)
	{
			count=__HAL_TIM_GET_COUNTER(&htim16);
	}
	HAL_TIM_Base_Stop(&htim16);	
}


